return {
    {
        "nvim-telescope/telescope.nvim",
        -- keys = {
        -- "<space>fa",
        -- "<space>fg",
        -- "<space>fm",
        -- "<space>fh",
        -- "<space>fi",
        -- "<space>fp",
        -- "<space>sw",
        -- "<space>ss",
        -- },
        -- cmd = { "Telescope" },
        dependencies = {
            { "Sharonex/grape.nvim" },
            { "nvim-lua/popup.nvim" },
            { "nvim-lua/plenary.nvim" },
            {
                "fdschmidt93/telescope-egrepify.nvim",
                config = function()
                    require("telescope").setup()
                    require("telescope").load_extension("egrepify")

                    vim.keymap.set(
                        "n",
                        "<space>sw",
                        ":lua require('telescope').extensions.egrepify.egrepify({search_dirs = {require('utils').find_git_root()}})<CR>",
                        { desc = "live grep" }
                    )
                end,
            },
            {
                "nvim-telescope/telescope-live-grep-args.nvim",
                config = function()
                    local lga_actions = require("telescope-live-grep-args.actions")
                    require("telescope").setup({
                        extensions = {
                            live_grep_args = {
                                auto_quoting = false, -- enable/disable auto-quoting
                                mappings = { -- extend mappings
                                    i = {
                                        ["<M-j>"] = lga_actions.quote_prompt(),
                                        ["<M-k>"] = lga_actions.quote_prompt({ postfix = " -t " }),
                                        ["<M-l>"] = lga_actions.quote_prompt({ postfix = " --iglob " }),
                                    },
                                },
                            },
                        },
                    })

                    -- vim.keymap.set(
                    -- "n",
                    -- "<space>sw",
                    -- ":lua require('telescope').extensions.live_grep_args.live_grep_args({search_dirs = {require('utils').find_git_root()}})<CR>",
                    -- { desc = "live grep" }
                    -- )
                    vim.keymap.set(
                        { "n", "v" },
                        "<space>ss",
                        ":lua require('telescope-live-grep-args.shortcuts').grep_word_under_cursor({search_dirs = {require('utils').find_git_root()}})<cr>",
                        { desc = "grep_word_under_cursor" }
                    )
                end,
            },
            {
                "kkharji/sqlite.lua",
                config = function()
                    if vim.api.nvim_eval('has("win32")') == 1 then
                        vim.g.sqlite_clib_path = "C:/Program Files/Neovim/bin/sqlite3.dll"
                    end
                end,
            },
            {
                "tsakirist/telescope-lazy.nvim",
                config = function()
                    require("telescope").load_extension("lazy")
                end,
            },
            {
                "xiyaowong/telescope-emoji.nvim",
                config = function()
                    require("telescope").load_extension("emoji")
                    require("telescope").setup({
                        extensions = {
                            emoji = {
                                action = function(emoji)
                                    -- argument emoji is a table.
                                    -- {name="", value="", cagegory="", description=""}

                                    vim.fn.setreg("*", emoji.value)
                                    print([[Press p or "*p to paste this emoji]] .. emoji.value)

                                    -- insert emoji when picked
                                    vim.api.nvim_put({ emoji.value }, "c", false, true)
                                end,
                            },
                        },
                    })

                    vim.keymap.set("n", "<space>fe", ":Telescope emoji<CR>", { desc = "find emoji" })
                end,
            },
            {
                "andrew-george/telescope-themes",
                config = function()
                    -- load extension
                    local telescope = require("telescope")
                    telescope.load_extension("themes")

                    vim.keymap.set(
                        "n",
                        "<space>ft",
                        ":Telescope themes<CR>",
                        { noremap = true, silent = true, desc = "Theme Switcher" }
                    )
                end,
            },
            {
                "folke/todo-comments.nvim",
                config = function()
                    require("todo-comments").setup({})
                    vim.keymap.set("n", "<space>fd", ":TodoTelescope<cr>", { desc = "todo list" })
                end,
            },
        },
        config = function()
            local actions = require("telescope.actions")
            require("telescope").setup({
                defaults = {
                    vimgrep_arguments = {
                        "rg",
                        "--color=never",
                        "--no-heading",
                        "--with-filename",
                        "--line-number",
                        "--column",
                        "--smart-case",
                    },
                    layout_config = {
                        height = 0.8,
                        width = 0.8,
                        preview_width = 0.5,
                    },
                    selection_strategy = "reset",
                    file_ignore_patterns = { "%.exe", "%.dll", "%.o", "%.pdf", "%.rar", "%.zip" },
                    path_display = { "absolute" },
                    prompt_prefix = " ",
                    selection_caret = " ",
                    set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
                    generic_sorter = require("telescope.sorters").get_generic_fuzzy_sorter,
                    file_sorter = require("telescope.sorters").get_fuzzy_file,
                    mappings = {
                        i = {
                            ["<C-j>"] = actions.move_selection_next,
                            ["<C-k>"] = actions.move_selection_previous,
                            ["<ESC>"] = actions.close,
                            ["<C-i>"] = actions.select_default,

                            ["<C-b>"] = actions.preview_scrolling_up,
                            ["<C-f>"] = actions.preview_scrolling_down,
                        },
                    },
                },
                extensions = {
                    frecency = {
                        show_scores = true,
                        show_unindexed = true,
                        ignore_patterns = { "*.git/*", "*/runtime/*" },
                        disable_devicons = false,
                    },
                },
            })

            vim.keymap.set(
                "n",
                "<space>fh",
                ":lua require('telescope.builtin').find_files({ path_display = { 'tail' }, search_dirs = { os.getenv('HOME') .. '/vimrc' } })<cr>",
                { desc = "find config files" }
            )

            vim.keymap.set("n", "<space>fi", ":Telescope lazy<cr>", { desc = "installed plugins" })

            if string.match(vim.o.rtp, "telescope%-frecency.nvim") then
                require("telescope").load_extension("frecency")
                vim.keymap.set("n", "<space>fm", ":Telescope frecency<cr>", { desc = "mru files" })
            else
                vim.keymap.set("n", "<space>fm", ":Telescope oldfiles<cr>", { desc = "mru files" })
            end

            vim.keymap.set("n", "<space>fg", function()
                local root = require("utils").find_git_root()
                if root ~= nil then
                    vim.api.nvim_exec("Telescope git_files", false)
                end
            end, { desc = "files in git" })

            vim.keymap.set("n", "<space>fb", ":Telescope buffers<cr>", { desc = "files in buffer" })
            vim.keymap.set(
                "n",
                "<space>fa",
                "<cmd>lua require('telescope.builtin').find_files({find_command = { 'rg', '--files', '--no-ignore', '--hidden', '--iglob', '!.git', require('utils').find_git_root(), }})<cr>",
                { desc = "all files in cwd()" }
            )

            vim.keymap.set("n", "<space>gl", ":Telescope git_commits<cr>", { desc = "git commit" })
            vim.keymap.set("n", "<space>gs", ":Telescope git_status<cr>", { desc = "git status" })

            --vim.keymap.set('n', '<space>fq', [[:lua require('telescope.builtin').find_files({ find_command = {'rg','--files', '--no-ignore','--hidden', '--iglob', '!.git',  vim.call('Search_root')} })<CR>]], {noremap = true, silent = true })
        end,
    },
}
